package com.joven.shelltest.utils.ruleExcute;

/**
 * @Author wzj
 * @Date 2023-11-22 09:11
 **/
public abstract class AbstractRule implements BaseRule{

    protected <T> T convert(RuleDto dto) {
        return (T) dto;
    }

    protected <T> boolean executeRule(T t) {
        return true;
    }

    @Override
    public boolean execute(RuleDto ruleDto) {
        return executeRule(convert(ruleDto));
    }


}
